package com.mon4cc.simulation;

import org.jbpt.pm.FlowNode;

/**
 * @author Ping
 * @date 2022/12/19 11:35
 **/
public class EndEventSimulatedInstance extends FlowNodeSimulatedInstance {

    public EndEventSimulatedInstance(TokenBasedBPMNSimulation bpmnSimulation) {
        super(bpmnSimulation, bpmnSimulation.getEndEvent());
    }
    @Override
    public void doExecute(ExecuteContext context) {
        // log end info.
        writer.write(this,context);
        this.bpmnSimulation.stopExecution(context);
        context.release();
        System.out.println("-- END --") ;
    }


}
